﻿Imports Microsoft.VisualBasic

Public Class DBChequeSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", Data.SqlDbType.NVarChar)
    Public ID As New TableField("ID", Data.SqlDbType.Int)
    Public PaymentVoucherID As New TableField("PaymentVoucherID", Data.SqlDbType.Int)
    Public BankID As New TableField("BankID", Data.SqlDbType.Int)
    Public BankAccountsID As New TableField("BankAccountsID", Data.SqlDbType.NVarChar)
    Public BankAccountNo As New TableField("BankAccountNo", Data.SqlDbType.NVarChar)
    Public ChequeNo As New TableField("ChequeNo", Data.SqlDbType.NVarChar)
    Public ChequeDate As New TableField("ChequeDate", Data.SqlDbType.DateTime)
    Public ChequeAmount As New TableField("ChequeAmount", Data.SqlDbType.Money)
    Public BeneficiaryName As New TableField("BeneficiaryName", Data.SqlDbType.NVarChar)
    Public BeneficiaryAccountNo As New TableField("BeneficiaryAccountNo", Data.SqlDbType.NVarChar)
    Public BeneficiaryBankName As New TableField("BeneficiaryBankName", Data.SqlDbType.NVarChar)

    Sub New()
        MyBase.StoredProcedureName = "ChequeSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal ID As String = "", _
                                 Optional ByVal PaymentVoucherID As String = "", _
                                 Optional ByVal BankID As String = "", _
                                 Optional ByVal BankAccountsID As String = "", _
                                 Optional ByVal BankAccountNo As String = "", _
                                 Optional ByVal ChequeNo As String = "", _
                                 Optional ByVal ChequeDate As String = "", _
                                 Optional ByVal ChequeAmount As String = "", _
                                 Optional ByVal BeneficiaryName As String = "", _
                                 Optional ByVal BeneficiaryAccountNo As String = "", _
                                 Optional ByVal BeneficiaryBankName As String = "") As Object

        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.ID.SetValue(ID, MyBase.FieldsArrayList)
        Me.PaymentVoucherID.SetValue(PaymentVoucherID, MyBase.FieldsArrayList)
        Me.BankID.SetValue(BankID, MyBase.FieldsArrayList)
        Me.BankAccountsID.SetValue(BankAccountsID, MyBase.FieldsArrayList)
        Me.BankAccountNo.SetValue(BankAccountNo, MyBase.FieldsArrayList)
        Me.ChequeNo.SetValue(ChequeNo, MyBase.FieldsArrayList)
        Me.ChequeDate.SetValue(ChequeDate, MyBase.FieldsArrayList)
        Me.ChequeAmount.SetValue(ChequeAmount, MyBase.FieldsArrayList)
        Me.BeneficiaryName.SetValue(BeneficiaryName, MyBase.FieldsArrayList)
        Me.BeneficiaryAccountNo.SetValue(BeneficiaryAccountNo, MyBase.FieldsArrayList)
        Me.BeneficiaryBankName.SetValue(BeneficiaryBankName, MyBase.FieldsArrayList)

        Return MyBase.QueryDatabase(QueryType)
    End Function

End Class
